package cn.itsource.util;

import cn.itsource.vo.*;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class GenerateUserUtil {
    public static List<User> getUserData() {
        List<User> users = new ArrayList<>();
        for (int i = 1; i <= 10; i++) {
            User user = User.builder()
                    .userId(i)
                    .userName("admin" + i)
                    .gender(i % 2 == 0 ? "男" : "女")
                    .salary(i * 1000.00)
                    .hireDate(new Date())
                    .build();
            users.add(user);
        }
        return users;
    }


    public static List<User2> getUser2Data() {
        List<User2> users = new ArrayList<>();
        for (int i = 1; i <= 10; i++) {
            User2 user = User2.builder()
                    .userId(i)
                    .userName("admin" + i)
                    .gender(i % 2 == 0 ? "男" : "女")
                    .salary(i * 1000.00)
                    .hireDate(new Date())
                    .build();
            users.add(user);
        }
        return users;
    }


    public static List<User3> getUser3Data() {
        List<User3> users = new ArrayList<>();
        for (int i = 1; i <= 10; i++) {
            User3 user = User3.builder()
                    .userId(i)
                    .userName("大哥" + i)
                    .hireDate(new Date())
                    .build();
            users.add(user);
        }
        return users;
    }


    public static List<User4> getUser4Data() {
        List<User4> users = new ArrayList<>();
        for (int i = 1; i <= 10; i++) {
            User4 user = User4.builder()
                    .userId(i)
                    .userName("大哥" + i)
                    .hireDate(new Date())
                    .salary(i*1000.79)
                    .build();
            users.add(user);
        }
        return users;
    }

    public static List<User5> getUser5Data(){
        List<User5> users = new ArrayList<>();
        for (int i = 1; i <= 10; i++) {
            User5 user = User5.builder()
                    .userId(i)
                    .userName("admin" + i)
                    .gender(i % 2 == 0 ? 0 : 2) // 性别枚举
                    .salary(i * 1000 + 8.888)
                    .hireDate(new Date())
                    .build();
            users.add(user);
        }
        return users;
    }

}
